<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>添加系统用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="../../component/elementUI/index.css" />
    <link rel="stylesheet" href="../../style/wangeditor.css" />
    <link rel="stylesheet" href="../../style/index.css" />
    <style>
      .el-descriptions-item__label {
        width: 100px;
      }
    </style>
  </head>

  <body>
    <div id="app" v-cloak>
      <yl-page-header content="添加村民信息"></yl-page-header>
      <el-form
        :model="form"
        :rules="rules"
        ref="contract"
        inline-message="true"
        style="width: 100%"
      >
        <div class="table_titel">
          <div class="titel">村民信息</div>
        </div>
        <el-descriptions :column="1" border size="small">
          <el-descriptions-item label="身份证上传">
            <el-form-item prop="ID_Front">
              <yl-upload
                unslider
                base64
                v-model.trim="form.ID_Front"
                @remove="()=>{this.form.ID_Number='';this.form.ID_Name=''}"
              ></yl-upload>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="身份证号">
            <el-form-item prop="ID_Number">
              <el-input
                v-model.trim="form.ID_Number"
                placeholder="请输入身份证号"
              >
                <i
                  v-if="iconLoading"
                  slot="prefix"
                  class="el-input__icon el-icon-loading"
                ></i>
              </el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="姓名">
            <el-form-item prop="ID_Name">
              <el-input v-model.trim="form.ID_Name" placeholder="请输入姓名">
                <i
                  v-if="iconLoading"
                  slot="prefix"
                  class="el-input__icon el-icon-loading"
                ></i>
              </el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="联系方式">
            <el-form-item prop="Phone">
              <el-input
                v-model.trim="form.Phone"
                placeholder="请输入联系方式"
              ></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="省-市-区">
            <el-form-item prop="">
              <el-cascader
                @change="changeCity($event,form)"
                v-model.trim="form.value1"
                placeholder="请选择省/市/区"
                filterable
                clearable
                :options="city"
                style="width: 100%"
              ></el-cascader>
            </el-form-item>
          </el-descriptions-item>
          <!-- <el-descriptions-item label="乡镇-村">
                    <el-form-item prop="">
                        <el-cascader @change="changeTown($event,form)" v-model.trim="form.value2" filterable :props="{value:'value'}" placeholder="请选择乡镇/村" :disabled="!form.town.length" clearable :options="form.town" style="width: 100%"></el-cascader>
                    </el-form-item>
                </el-descriptions-item> -->
          <!-- <el-descriptions-item label="地址">
                    <el-form-item prop="">
                        <el-cascader v-model="value1" placeholder="请选择省/市/区" filterable clearable :options="city" style="width: 100%"></el-cascader>
                    </el-form-item>
                </el-descriptions-item>
                <el-descriptions-item label="详细地址">
                    <el-form-item prop="">
                        <el-input :disabled="!value1.length" v-model.trim="value2" placeholder="请输入详细地址"></el-input>
                    </el-form-item>
                </el-descriptions-item> -->
        </el-descriptions>
        <div class="table_titel">
          <div class="titel">土地信息</div>
          <!-- <div class="operation">
            <el-button type="primary" size="small" @click="add_land"
              >添加</el-button
            >
            <el-button type="danger" size="small" @click="remove_land"
              >删除</el-button
            >
          </div> -->
        </div>
        <el-descriptions
          style="margin-bottom: 5px"
          v-for="(item,index) in land"
          :key="index"
          :column="2"
          border
          size="small"
        >
          <el-descriptions-item label="土地证上传">
            <el-form-item prop="Land_Certificate">
              <yl-upload
                @input="handleLand($event,item)"
                unslider
                base64
                v-model.trim="item.Land_Certificate"
              ></yl-upload>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="地号">
            <el-form-item prop="Land_Number">
              <el-input
                v-model.trim="item.Land_Number"
                placeholder="请输入地号"
              ></el-input>
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item label="品种">
            <el-form-item prop="VarietyID">
              <el-select
                v-model="VarietyID"
                @change="dj"
                filterable
                placeholder="请选择品种"
                class="kuang"
                style="width: 100%"
              >
                <el-option
                  v-for="item in iJSONArray_Variety"
                  :key="item.VarietyID"
                  :label="item.VarietyName"
                  :value="item.VarietyID"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="等级">
            <el-form-item prop="GradeID">
              <el-select
                v-model="GradeID"
                placeholder="请选择等级"
                class="kuang"
                style="width: 100%"
              >
                <el-option
                  v-for="item in iJSONArray_VarietyGrade"
                  :key="item.GradeID"
                  :label="item.GradeName"
                  :value="item.GradeID"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-descriptions-item>
          <!-- <el-descriptions-item label="种植品种">
            <el-form-item prop="Located">
              <el-input
                v-model.trim="item.Located"
                placeholder="请输入种植品种"
              ></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="等级">
            <el-form-item prop="Located">
              <el-input
                v-model.trim="item.Located"
                placeholder="请输入品种等级"
              ></el-input>
            </el-form-item>
          </el-descriptions-item> -->
          <el-descriptions-item label="收购地">
            <el-form-item prop="Located">
              <el-input
                v-model.trim="item.Located"
                placeholder="请输入收购地"
              ></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="收购数量">
            <el-form-item prop="PurchaseQuantity">
              <el-input-number
                v-model="PurchaseQuantity"
                @change="handleChange"
                :min="1"
                label="描述文字"
              ></el-input-number>
              /公斤
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="收购单价">
            <el-form-item prop="PurchasePrice">
              <el-input-number
                v-model="PurchasePrice"
                @change="handleChange"
                :min="1"
                label="描述文字"
              ></el-input-number>
              <el-select v-model="Unit" placeholder="单位">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="收购日期">
            <el-form-item prop="PurchaseDate">
              <el-date-picker
                v-model="PurchaseDate"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
              >
              </el-date-picker>
            </el-form-item>
          </el-descriptions-item>

          <el-descriptions-item label="省-市-区">
            <el-form-item prop="">
              <el-cascader
                @change="changeCity($event,item)"
                v-model.trim="item.value1"
                placeholder="请选择省/市/区"
                filterable
                clearable
                :options="city"
                style="width: 100%"
              ></el-cascader>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="乡镇-村">
            <el-form-item prop="">
              <el-cascader
                @change="changeTown($event,item)"
                v-model.trim="item.value2"
                filterable
                :props="{value:'value'}"
                placeholder="请选择乡镇/村"
                :disabled="!item.town.length"
                clearable
                :options="item.town"
                style="width: 100%"
              ></el-cascader>
            </el-form-item>
          </el-descriptions-item>

          <!-- <el-descriptions-item label="种植面积">
                    <el-form-item prop="Planting_Area">
                        <el-input v-model.trim="item.Planting_Area" placeholder="请输入地号"></el-input>
                    </el-form-item>
                </el-descriptions-item> -->
          <!-- <el-descriptions-item label="种植类型">
                    <el-form-item prop="Category_SerialNumber">
                        <el-select clearable v-model.trim="item.Category_SerialNumber" placeholder="请选择种植类型" filterable style="width: 100%">
                            <el-option v-for="(item,index) in category" :key="index" :label="item.Category_Name" :value="item.Category_SerialNumber"></el-option>
                        </el-select>
                    </el-form-item>
                </el-descriptions-item> -->
        </el-descriptions>
        <div style="height: 90px"></div>
        <el-form-item class="form-operation">
          <el-button @click="window.history.back()">返回</el-button>
          <el-button
            type="primary"
            :loading="loading"
            @click="submitFormxc('contract')"
            >提交</el-button
          >
        </el-form-item>
      </el-form>
    </div>
    <script type="text/javascript" src="../../utils/wangeditor.js"></script>
    <script type="text/javascript" src="../../utils/jquery.min.js"></script>
    <script type="text/javascript" src="../../utils/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../utils/vue.min.js"></script>
    <script type="text/javascript" src="../../utils/vuex.min.js"></script>
    <script
      type="text/javascript"
      src="../../component/elementUI/index.js"
    ></script>
    <script type="text/javascript" src="../../component/component.js"></script>
    <script type="text/javascript" src="../../config/config.js"></script>
    <script type="text/javascript" src="../../utils/compressor.js"></script>
    <script type="text/javascript" src="../../utils/ID_Validity.js"></script>
    <script type="text/javascript" src="../../utils/utils.js"></script>
    <script type="text/javascript" src="js/add.js"></script>
  </body>
</html>
